/**
 * Created by youyinghui on 2017/4/13.
 */
$(function(){
    $.ajax({
        type:"POST",
        url:"data/list.json",
        data:"data",
        success:function(data){
            console.log("success");
            console.log(data.lists);
            var lihtml = "";
            /*var ulhtml = "";*/
            for(var i=0;i<data.lists.length;i++){
                console.log(data.lists[i].name);
                lihtml += '<li class="">'+
                        '<span class="customer_name"> + data.lists[i].name +</span>'+
                        '<span class="customer_mobile">+ data.lists[i].mobile +</span>'+
                        '<span class="customer_age">+ data.lists[i].age  +</span>'+
                        '<span class="customer_msg"><a href="#">查看详情</a></span>'+
                        '</li>';
            }
        },
        fail:function(data){
            console.log("fail");
            console.log(data);
        }
    })
});